﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace SoGame.Model
{
    public class NavigationLinkInfo : GalaSoft.MvvmLight.ViewModelBase
    {
        private int _id;
        public int Id
        {
            get { return _id; }
            set
            {
                _id = value;
                RaisePropertyChanged("Id");
            }
        }

        private bool isFirstElement = false;
        public bool IsFirstElement
        {
            get
            {
                return isFirstElement;
            }
            set
            {
                isFirstElement = value;
                RaisePropertyChanged("IsFirstElement");
                RaisePropertyChanged("ShowNavRectable");
            }
        }
        public Visibility ShowNavRectable
        {
            get
            {
                return IsFirstElement ? Visibility.Collapsed : Visibility.Visible;
            }
        }
        private string uri;
        public string URI
        {
            get
            {
                return uri;
            }
            set
            {
                uri = value;
                RaisePropertyChanged("URI");
                URIPath = "/" + URI;
            }
        }
        string uripath = "";
        public string URIPath
        {
            get
            {
                return uripath;
            }
            set
            {
                uripath = value;
                RaisePropertyChanged("URIPath");
            }
        }
        private string navText;
        public string NavText
        {
            get
            {
                return navText;
            }
            set
            {
                navText = value;
                RaisePropertyChanged("NavText");
            }
        }
        private bool linkIsActive;
        public bool LinkIsActive
        {
            get
            {
                return linkIsActive;
            }
            set
            {
                linkIsActive = value;
                RaisePropertyChanged("LinkIsActive");
                LinkVisualState = LinkIsActive ? "ActiveLink" : "InactiveLink";
            }
        }

        string linkVisualState = "InactiveLink";
        public string LinkVisualState
        {
            get
            {
                return linkVisualState;
            }
            set
            {
                linkVisualState = value;
                RaisePropertyChanged("LinkVisualState");
            }
        }
    }
}
